#include "FrequencyTableCreator.h"
#include "FrequencyTable.h"
#include "DataSource.h"


FrequencyTable* FrequencyTableCreator::buildTable(DataSource* s)
{
	FrequencyTable* table = new FrequencyTable();
	while (s->hasNextByte())
	{
		uint8_t byte = s->getNextByte();
		table->addByte(byte);
	}	
	return table;
}